package edu.zut.filter;

import javax.servlet.*;
import javax.servlet.annotation.*;
import java.io.IOException;

/**
 * @WebFilter:代替web.xml中关于filter的映射配置
 * filterName ：filter-name
 * value == urlPatterns   映射的url
 */
@WebFilter(filterName = "FilterDemo4",value = "/*")
public class FilterDemo4 implements Filter {
    public void init(FilterConfig config) throws ServletException {
    }

    public void destroy() {
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
        chain.doFilter(request, response);
    }
}
